package com.jsu.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.example.model.user.pojo.Rule;
import org.example.model.user.pojo.User;

import java.util.List;

public interface IntegralRuleMapper extends BaseMapper<Rule> {
    @Select("SELECT * FROM point_rule WHERE point_rule_name LIKE CONCAT('%', #{keyword}, '%') " +
            "OR introduce LIKE CONCAT('%', #{keyword}, '%') " +
            "OR point_num LIKE CONCAT('%', #{keyword}, '%')")
    List<Rule> searchRuleByKeyword(@Param("keyword") String keyword);
}
